1. Field of the Invention
This invention relates generally to the field of data communications and in particular to determining bit rates for data transfer.
2. Description of the State of the Art
In a data transfer operation, data transmitted at a particular bit rate from one end of a data link must be received at the same rate at the other end of the data link in order to avoid errors. Several techniques for automatic bit rate detection or xe2x80x9cautobaudingxe2x80x9d, which ensures that a sending and receiving bit or data rate are the same, are currently known.
According to one known technique, a predetermined bit pattern, typically the ASCII code for the uppercase letter xe2x80x9cAxe2x80x9d, (0x41), along with a start bit and a stop bit, is sent from one end of a data link and received by a receiver at the other end of the data link. A data link between a processor and a modem in a communication device is one such data link for which autobauding is commonly employed. At the receiver, the received start bit, data bits, and stop bit are buffered, the duration of the start bit is determined using a local clock or timer, for example, and the sending bit rate is the determined from the duration of the start bit. If the stored bits are decoded as xe2x80x9cAxe2x80x9d using the determined bit rate, then the sending bit rate was correctly determined, and the bit rate at the receiver is set accordingly. However, this technique requires buffering of received data during bit rate detection.
Another bit rate detection scheme involves automatic retransmission by a sender, and trial and error bit rate selection at the receiver. During bit rate detection, the receiver is configured to expect a predetermined bit pattern on the data link. A particular bit rate is selected at the receiver, and the next received byte is detected using the selected bit rate. If the predetermined bit pattern is detected, then the selected bit rate is the same as the sending bit rate, the receiver maintains the selected bit rate, and sends a response, including the predetermined bit pattern, to the sender as an indication that the bit rate has been determined correctly. Otherwise, the receiver selects another bit rate and awaits a subsequent data byte from the sender. In the absence of a response from the receiver within a predetermined time, the sender retransmits the predetermined bit pattern to the receiver. This process is repeated until the sending bit rate is selected by the receiver. Bit rate detection according to this scheme may entail several bit rate selections and byte retransmissions, and as such is typically slow.
According to an aspect of the invention, a method of matching a bit rate to a transmit bit rate used to transmit data on a data link comprises the steps of receiving data on a data link, detecting a bit pattern in the received data using a bit rate, determining whether the detected bit pattern comprises one of a plurality of expected bit patterns, and adjusting the bit rate to an adjusted bit rate based on the detected bit pattern where the detected bit pattern comprises one of the plurality of expected bit patterns.
A system of matching a bit rate to a transmit bit rate used to transmit data on a data link, according to a related aspect of the invention, comprises means for receiving data on a data link, means for detecting a bit pattern in the received data using a bit rate, means for determining whether the detected bit pattern comprises one of a plurality of expected bit patterns, and means for adjusting the bit rate to an adjusted bit rate based on the detected bit pattern where the detected bit pattern comprises one of the plurality of expected bit patterns.
In accordance with another aspect of the invention, an electronic device comprises a data link, a processor connected to the data link and configured to transmit bit rate detection data on the data link using a transmit bit rate, and a modem connected to the data link, and configured to receive the bit rate detection data, to detect a bit pattern in the bit rate detection data using a receive bit rate, to determine whether the detected bit pattern comprises one of a plurality of expected bit patterns, to adjust the receive bit rate to an adjusted bit rate based on the detected bit pattern where the detected bit pattern comprises one of the plurality of expected bit patterns, and to use the adjusted bit rate for communications on the data link.
Further features of the invention will be described or will become apparent in the course of the following detailed description.